<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>我的任务看板</title>
  <link rel="stylesheet" href="./style.css">
</head>
<body>

<h1>我的任务看板</h1>

<div class="board" id="app">

  <div class="list"
       v-for="(list, index) in lists"
       :key="index"
       @dragover.prevent
       @drop="onListDrop($event, index)"
  >
    <h2>{{ list.title }}</h2>

    <div class="card"
         v-for="(card, cardIndex) in list.cards"
         :key="card.id"
         draggable="true"
         @dragstart="onDragStart($event, index, cardIndex)"
         @dragover.prevent
         @drop.stop="onCardDrop($event, index, cardIndex)"
    >
      {{ card.text }}
    </div>
  </div>

</div>
<script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
<script src="./script.js"></script>
</body>
</html>
